package com.oren.system.service;

import com.oren.base.pojo.Tree;
import com.oren.system.pojo.Department;
import com.oren.system.pojo.TreeEntity;

import javax.persistence.criteria.CriteriaBuilder;
import java.util.List;

/**
 * @Author: wsw
 * @Description: 部门service
 * @Date: Create on 2018/7/29 15:17
 */
public interface DepartmentService {

    /**
     * 获取树形结构数据
     * @return
     * @throws Exception
     */
    List<Tree> getDepartmentTree()throws Exception;

    /**
     * 删除
     * @param id
     * @return
     * @throws Exception
     */
    int deleteEntity(Integer id)throws Exception;

    /**
     * 修改
     * @param department
     * @return
     * @throws Exception
     */
    int updaetEntity(Department department)throws Exception;

    /**
     * 添加
     * @param department
     * @return
     * @throws Exception
     */
    int insertEntity(Department department)throws Exception;
}
